package com.koron.ticket.work.workflow.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
public class WorkFlow {

    @ApiModelProperty(value = "ID")
    private String id;

    @ApiModelProperty(value = "工作票id")
    private String workTicketId;

    @ApiModelProperty(value = "流程节点")
    private Integer status;

    @ApiModelProperty(value = "人员操作类型")
    private String type;

    @ApiModelProperty(value = "操作人账户")
    private String account;

    @ApiModelProperty(value = "操作人手机号")
    private String phone;

    @ApiModelProperty(value = "操作人名字")
    private String name;

    @ApiModelProperty(value = "操作时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date operationTime;

    @ApiModelProperty(value = "意见")
    private String opinion;

    @ApiModelProperty(value = "删除标志")
    private Integer deleteFlag = 0;

    @ApiModelProperty(value = "创建人ID", hidden = true)
    private String createUserId;

    @ApiModelProperty(value = "创建人姓名", hidden = true)
    private String createUserName;

    @ApiModelProperty(value = "创建时间", hidden = true)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date createTime;

    /**
     * 下面为了业务增加的字段
     */
    @ApiModelProperty(value = "仅用于工作票提交中的业务，与原数据中的id冲突")
    private String workFlowId;

    @ApiModelProperty(value = "仅用于工作票-许可阶段提交中的业务，用于存储签名(列表)的相关数据")
    private String workFlowListString;

    @ApiModelProperty(value = "单位id")
    private String orgId;

    @ApiModelProperty(value = "单位名称")
    private String orgName;

    @ApiModelProperty(value = "最后修改时间", hidden = true)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;
}
